fix(cli): seed host exec approvals during bootstrap#176
Open
kumarabhirup wants to merge 1 commit into
Open
Conversation
Bootstrap now writes permissive host exec approval defaults before onboard so web chat can execute from first boot. Preserve existing approval rules while reapplying the CLI settings after onboarding. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exec-approvals.jsonbefore onboarding so web chat can execute from first bootTest plan
pnpm exec vitest run --config vitest.unit.config.ts src/cli/bootstrap-external.bootstrap-command.test.tspnpm exec oxlint --type-aware src/cli/bootstrap-external.ts src/cli/bootstrap-external.bootstrap-command.test.ts(currently reports existing file-level issues in these touched files)Made with Cursor
Note
High Risk
Writes permissive host-side exec approval defaults during bootstrap, which affects command-execution security policy and could unintentionally relax approvals on some hosts if misapplied.
Overview
Ensures bootstrap seeds a host-side exec approval policy by writing
exec-approvals.jsonalongsideopenclaw.jsonbefore runningopenclaw onboard, keeping webchat exec unblocked on first boot.Adds
ensureHostExecApprovalDefaults()to forcedefaults.security="full"anddefaults.ask="off"while preserving any existing per-agent approval rules/version, and extends bootstrap tests to assert pre-onboard staging and post-bootstrap persistence of both config layers.Reviewed by Cursor Bugbot for commit c899923. Bugbot is set up for automated code reviews on this repo. Configure here.